<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Lokipedia - Capturing local Knowledge via real-time Conversations</title>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>


</head>
<body>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

<script type="text/javascript">
    FB.init("308d78855fa29b2fbde10bfbbff5e03a", "../xd_receiver.htm");
</script>

<script type="text/javascript" src="lib/gears_init.js"></script>
<script>

function init() {
if (!window.google || !google.gears) {
alert('not installed');
return;
}


function successCallback(p) {
var address = p.gearsAddress.city + ', '
+ p.gearsAddress.region + ', '
+ p.gearsAddress.country + ' ('
+ p.latitude + ', '
+ p.longitude + ')';

    var longitude = document.getElementById('longitude');

    longitude.value = p.longitude;

    var latitude = document.getElementById('latitude');

    latitude.value = p.latitude;

    var city = document.getElementById('city');

    city.value = p.gearsAddress.city;

    var region = document.getElementById('region');

    region.value = p.gearsAddress.region;

    var country = document.getElementById('country');

    country.value = p.gearsAddress.country;

    var channel = document.getElementById('channelName');

    channel.value = p.gearsAddress.city;

//alert(address);
    
     aryClassElements.length = 0;

    getElementsByClassName( 'FB_Link', document.body );

    for ( var i = 0; i < aryClassElements.length; i++ ) {
        var name = document.getElementById("userName");
        var link = aryClassElements[i];
        name.value = link.innerHTML;
        document.getElementById("testForm").submit();
    }

}


function errorCallback(err) {
return;
}

try {
var geolocation = google.gears.factory.create('beta.geolocation');
geolocation.getCurrentPosition(successCallback,
errorCallback,
{ enableHighAccuracy: true,
gearsRequestAddress: true });
} catch (e) {
return;
}

}
</script>

<script lanuage="JavaScript">
var aryClassElements = new Array();

function doSomething() {
    init()
}

function getElementsByClassName( strClassName, obj ) {
    if ( obj.className == strClassName ) {
        aryClassElements[aryClassElements.length] = obj;
    }
    for ( var i = 0; i < obj.childNodes.length; i++ )
        getElementsByClassName( strClassName, obj.childNodes[i] );
}
</script>

<div id="maincontainer">

<div id="topsection"></div>

<div id="contentwrapper">
<div id="contentcolumn">
<div id="index-text">
<div id="logo-text-grey"><img class="displayed" src="img/logo.jpg"></div>
<div class="description">Local real-time conversations + Knowledge = LOVE</div>
<div id="fb_button">1. <fb:login-button v="2" size="medium"></fb:login-button></div>
<div id="login">2. 

<form name="test" action="index.php" id="testForm" method="post">
    <input type="hidden" name="userName" id="userName"/>
    <input type="hidden" name="longitude" id="longitude"/>
    <input type="hidden" name="latitude" id="latitude"/>
    <input type="hidden" name="city" id="city"/>
    <input type="hidden" name="region" id="region"/>
    <input type="hidden" name="country" id="country"/>
    <input type="hidden" name="channelName" id="channelName"/>
    <div id="testid">
        <fb:name uid="loggedinuser" useyou="false" linked="true"></fb:name>
    </div>
    <input type="button" value="Log In to Chat" onClick="javascript:doSomething()"/>
</form>


</div>
</div>
</div>
</div>

<div class="innertube"></div>

</div>

<div id="footer"></div>

</div></body>
</html>